Skip to content

feat: add consolidated carve-changesets CLI - #42

Merged
shaug merged 4 commits into
mainfrom
scott/30-carve-changesets-cli
Jul 21, 2026
Merged

feat: add consolidated carve-changesets CLI#42
shaug merged 4 commits into
mainfrom
scott/30-carve-changesets-cli

Conversation

@shaug

@shaug shaug commented Jul 21, 2026

Copy link
Copy Markdown
Owner

TL;DR

Adds the consolidated, safety-hardened carve-changesets CLI while preserving live chain identity and validation from the merged contract work.

Summary

  • Add one classified scripts/cli.py surface for planning, materialization, comparison, validation, status, PR creation, and exact-lease changeset pushes
  • Preserve plan-free live status and bind strict validation to current changeset refs, source identity, ancestry, and tree equivalence
  • Centralize GitHub CLI access with structured failures, file-based PR bodies, exact candidate verification, and explicit repository binding from the selected git remote
  • Keep base and source branches out of force-push paths, make remote mutations dry-run by default, and require explicit test commands
  • Port the focused tests and evals to the new skill while leaving prepare-changesets untouched

Validation

  • just format
  • just lint-py
  • just lint-md
  • just test-carve-changesets — 70 tests passed
  • just test
  • git diff --check
  • Every complete non-carve skill passes skills-ref validate
  • Repository-owned aggregate review is schema-valid and clean with zero findings at c8ca89566562d7d154bfe1a1711140323e3ba9f8

just lint reaches the downstream #35 packaging boundary and fails only with skills/carve-changesets: Missing required file: SKILL.md. Issue #35 owns that file; this exact failure is the authorized exception for #30. No other lint or validation failure is waived.

Tickets

Fixes #30

shaug added 4 commits July 21, 2026 15:13
## Summary
- Port the frozen prepare-changesets implementation behind one classified CLI
- Harden GitHub, preflight, push-chain, and file-based message boundaries
- Wire materialization and live status validation to the published carve contracts
- Port focused tests and evals to the new skill root

## Why
- Provide the implementation surface required by issue #30 without changing the frozen source skill
- Make remote mutation dry-run by default and preserve the base and source branches
## Summary
- Make status plan-free and bind strict validation to materialized live chains
- Bind pull request publication to exact local and remote heads and verify the created PR
- Point evals at the consolidated interface and standardize db_compare spelling

## Why
- Preserve live truth after ephemeral plans are removed
- Reject stale or rewritten candidates before they become remote artifacts
- Keep the greenfield interface and tests internally consistent
## Summary
- Resolve the selected git remote to an exact GitHub host, owner, and repository
- Pass that repository explicitly to every pull request create, view, and list call
- Cover a non-default enterprise remote while a conflicting origin and GH_REPO exist

## Why
- Keep live git validation and GitHub reads and mutations on the same repository
- Prevent ambient CLI configuration from redirecting candidate-bound operations
## Summary
- Remove the eager patch and hunk precheck from strict validation
- Let apply_changeset provide the single strict-apply viability proof
- Delete the now-unused patch-check helpers

## Why
- Avoid running two implementations of the same patch applicability check
- Keep strict validation behavior aligned with actual chain materialization
@shaug
shaug merged commit 2c82f2e into main Jul 21, 2026
1 check failed
@shaug
shaug deleted the scott/30-carve-changesets-cli branch July 21, 2026 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build the consolidated carve-changesets CLI with a hardened mutation surface

1 participant